// 服务器全部接口相同返回的数据类型
export interface ResponseData {
    code: number,
    message: string,
    ok: boolean
}

// 菜单与按钮的标识数据对象
export interface PermissionData {
    id: number
    createTime: string
    updateTime: string
    pid: number
    name: string
    code: string
    toCode: string
    type: number
    status: null | string
    level: number
    children: PermissionList
    select: boolean
}

export type PermissionList = PermissionData[]

// 菜单与按钮权限接口返回类型
export interface PermissionResponseData extends ResponseData {
    data: PermissionList
}

// 添加与修改菜单携带的参数的ts类型
export interface MenuParams {
    id?: number,
    code: string, // 权限数值
    level: number, // 新增的是几级菜单
    name: string, //菜单的名字
    pid: number // 给哪个菜单新增
}